package com.comcast.core.eeg.eventsubscription.service;

import javax.jms.JMSException;

import com.comcast.core.eeg.eventsubscription.types.DeliveryOption;
import com.comcast.core.eeg.types.BusinessEvent;
import com.comcast.core.eeg.types.Event;

/**
 * 
 * @author thuang000c
 *
 */
public interface Subscription {
    
    public void setSubscriptionId(String id);
    public String getSubscriptionId();    
    
    /**
     * 
     * @param option
     * @return empty array if there is no events are available
     * @throws JMSException      
     */
    public BusinessEvent[] get(DeliveryOption option) throws JMSException;
    
    /**
     * 
     * @param option
     * @return empty array if there is no events are available
     * @throws JMSException
     */
    public Event[] retrieve(DeliveryOption option) throws JMSException;    
    
    public void close();
}
